#include<iostream>
#include "hyperloglog.h"
int main(){
    std::string userList[] = {
            // 前50个用户，大量重复
            "user_001", "user_002", "user_003", "user_001", "user_004", "user_002", "user_005", "user_001",
            "user_006", "user_007", "user_003", "user_008", "user_009", "user_010", "user_002", "user_011",
            "user_012", "user_013", "user_001", "user_014", "user_015", "user_016", "user_005", "user_017",
            "user_018", "user_019", "user_020", "user_001", "user_021", "user_002", "user_022", "user_003",
            "user_023", "user_024", "user_025", "user_001", "user_026", "user_002", "user_027", "user_005",
            "user_028", "user_029", "user_003", "user_030", "user_031", "user_032", "user_002", "user_033",
            "user_034", "user_035", "user_001", "user_036", "user_037", "user_038", "user_005", "user_039",

            // 中间段，中等重复
            "user_040", "user_041", "user_042", "user_043", "user_044", "user_045", "user_046", "user_047",
            "user_048", "user_049", "user_050", "user_001", "user_002", "user_051", "user_052", "user_003",
            "user_053", "user_054", "user_055", "user_005", "user_056", "user_057", "user_058", "user_059",
            "user_060", "user_061", "user_062", "user_063", "user_064", "user_065", "user_066", "user_067",
            "user_068", "user_069", "user_070", "user_001", "user_002", "user_071", "user_072", "user_003",
            "user_073", "user_074", "user_075", "user_005", "user_076", "user_077", "user_078", "user_079",

            // 后段，更多独特用户
            "user_080", "user_081", "user_082", "user_083", "user_084", "user_085", "user_086", "user_087",
            "user_088", "user_089", "user_090", "user_091", "user_092", "user_093", "user_094", "user_095",
            "user_096", "user_097", "user_098", "user_099", "user_100", "user_101", "user_102", "user_103",
            "user_104", "user_105", "user_106", "user_107", "user_108", "user_109", "user_110", "user_111",
            "user_112", "user_113", "user_114", "user_115", "user_116", "user_117", "user_118", "user_119",
            "user_120", "user_121", "user_122", "user_123", "user_124", "user_125", "user_126", "user_127",
            "user_128", "user_129", "user_130", "user_131", "user_132", "user_133", "user_134", "user_135",
            "user_136", "user_137", "user_138", "user_139", "user_140", "user_141", "user_142", "user_143",
            "user_144", "user_145", "user_146", "user_147", "user_148", "user_149", "user_150"
    };
    for (int p = 3;p <= 12;p++){
        auto* h = new HyperLogLog<std::string>(p);
        for (int i = 0;i < 175;i++){
            h->AddElem(userList[i]);
        }
        std::cout << "p = " << p << ", cardinality = " << h->GetCardinality() << "\n";
    }
}